#ifndef PATIENTINFOUI_H
#define PATIENTINFOUI_H

#include <QWidget>
#include <QLabel>
#include "BaseWidget.h"
#include "WidgetId.h"
#include "AppLog.h"

class FilePaging;
namespace Ui {
class PatientInfoUi;
}

class PatientInfoUi : public BaseWidget
{
    Q_OBJECT

public:
    explicit PatientInfoUi(QWidget *parent = nullptr);
    ~PatientInfoUi()override;
    void activate()override;
    void inactivate()override;

    QVector<QLabel*> g_imageLabel;
    QVector<QLabel*> g_videoLabel;

protected:
    void changeEvent(QEvent* e)override;
    bool eventFilter(QObject *watched, QEvent *event)override;
    void updateImage();
    void updateVideo();
private slots:
    void on_gohome_clicked();

    void on_goback_clicked();

    void on_modifyPatient_clicked();

    void on_imageLeftPage_clicked();

    void on_imageRightPage_clicked();

    void on_videoLeftPage_clicked();

    void on_videoRightPage_clicked();

    void on_applyPatient_clicked();

    void on_deletePatient_clicked();

    void on_exportPatient_clicked();

    void PatientInfoUi_HintDialog_Slot(int type);

    void PatientInfoUi_Export_Slot();
    void PatientInfoUi_Delete_Slot();
    void PatientInfoUi_Modify_Slot();

private:
    Ui::PatientInfoUi *ui;
    FilePaging *m_imageReader = nullptr;
    FilePaging *m_videoReader = nullptr;
    QVector<QString> m_images;
    QVector<QString> m_videos;
    QPixmap *m_defaultPixmap = nullptr;
    bool m_allowOpreation  = false;
};

#endif // PATIENTINFOUI_H
